#ifndef ALTERNATIVEWINDOW_H
#define ALTERNATIVEWINDOW_H

#include <QMainWindow>
#include <QAction>


#include <QSqlDatabase>
#include <QSqlQuery>


#include <qwt_plot_price.h>
#include <qwt_array.h>

class QAction;


class AlternativeWindow : public QMainWindow
{

   Q_OBJECT
    public:
        AlternativeWindow();

        QSize sizeHint() const {
            return QSize(800, 600);
        }

        //gui setup
        void setupActions();
        void setupMenu();
        void setupUi();
        void setupDb();
        void setupPlotArea();

       void refreshPlotItems(QwtArray<QwtPriceMove> *sample, const QString plotTitle);



    private:

        QAction *openFileAction;
        QAction *showExampleAction;
        QAction *exitAppAction;


        QSqlDatabase db;

        //grafico plotado
        QwtPlotPrice *price;

        //area de plotagem
        QwtPlot *plot;

    private slots:
        //file manip
        void openFile();
        void showExample();


};


#endif // ALTERNATIVEWINDOW_H
